/**
 * Copyright (c) 2015-2030 by Beijing Yanlight Co., Ltd.
 * All rights reserved.
 */
package com.yanlight.support.pay;

import com.yanlight.support.alipay.AlipayNotifyHandler;
import com.yanlight.support.wx.WxpayNotifyHandler;
import com.yanlight.type.PayType;

/**
 * 
 * @author haolw
 * @time 2017/10/27
 */
public abstract class PayNotifyHandlerFactory {

	public static PayNotifyHandler getPayNotifyHandler(Integer payType) {
		PayNotifyHandler handler = null;
		if (PayType.ALIPAY.getType().equals(payType)) {
			handler = AlipayNotifyHandler.getInstance();
		} else if (PayType.WXPAY.getType().equals(payType)) {
			handler = WxpayNotifyHandler.getInstance();
		} else {
			handler = DefaultPayNotifyHandler.getInstance();
		}
		return handler;
	}

}
